﻿//CCMManager
//Copyright (c) 2011 by David Kamphuis
//
//   This file is part of CCMManager.
//
//    CCMManager is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    Foobar is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

using System.ComponentModel.Composition;
using Caliburn.Micro;
using CCMManager.Framework;

namespace CCMManager.ViewModels
{
    [Export(typeof(IShell))]
    public class ShellViewModel : Conductor<IScreen>.Collection.OneActive, IShell
    {

        [ImportingConstructor]
        public ShellViewModel(ActionsViewModel actionsViewModel,
            EditorViewModel EditorViewModel,
            IEventAggregator eventAggregator)
        {
            HasActiveDialog = false;
            eventAggregator.Subscribe(this);
            Items.Add(actionsViewModel);
            DisplayName = "CCMManager";
            Items.Add(EditorViewModel);
        }

        protected override void OnInitialize()
        {
            base.OnInitialize();
            //DisplayName = AppStrings.AppTitle;
            ActivateItem(Items[0]);
        }

        public bool HasActiveDialog { get; set; }

    }
}
